﻿function sethomepage() {
    var cookie_value = hbctl_.readCookie("pp_homepage");
    if (cookie_value == "") {
        document.body.style.behavior = 'url(#default#homepage)';
        hbctl_.SetHomePage("http://pp.coollu.com");
        hbctl_.writeCookie("pp_homepage", "true", 168);
    }
}
function setfavorite() {
    var cookie_value = hbctl_.readCookie("pp_favorite");
    if (cookie_value == "") {
        hbctl_.AddFavorite("酷鹿图海", "http://pp.coollu.com");
        hbctl_.writeCookie("pp_favorite", "true", 168);
    }
}
/*
sethomepage();设为首页
setfavorite();加入收藏夹
hbctl_.writeCookie("pp_favorite", "true", 168);将记录写进cookie,168小时(一周)后失效

使用方法<body onbeforeunload="setfavorite();">//用户离开页面时如果cookie不存在则弹出操作提示
*/